//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension CodeStar {
    // MARK: Enums

    // MARK: Shapes

    public struct AssociateTeamMemberRequest: AWSEncodableShape {
        /// A user- or system-generated token that identifies the entity that requested the team member association to the project. This token can be used to repeat the request.
        public let clientRequestToken: String?
        /// The ID of the project to which you will add the IAM user.
        public let projectId: String
        /// The AWS CodeStar project role that will apply to this user. This role determines what actions a user can take in an AWS CodeStar project.
        public let projectRole: String
        /// Whether the team member is allowed to use an SSH public/private key pair to remotely access project resources, for example Amazon EC2 instances.
        public let remoteAccessAllowed: Bool?
        /// The Amazon Resource Name (ARN) for the IAM user you want to add to the AWS CodeStar project.
        public let userArn: String

        public init(clientRequestToken: String? = nil, projectId: String, projectRole: String, remoteAccessAllowed: Bool? = nil, userArn: String) {
            self.clientRequestToken = clientRequestToken
            self.projectId = projectId
            self.projectRole = projectRole
            self.remoteAccessAllowed = remoteAccessAllowed
            self.userArn = userArn
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 256)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[\\w:/-]+$")
            try self.validate(self.projectId, name: "projectId", parent: name, max: 15)
            try self.validate(self.projectId, name: "projectId", parent: name, min: 2)
            try self.validate(self.projectId, name: "projectId", parent: name, pattern: "^[a-z][a-z0-9-]+$")
            try self.validate(self.projectRole, name: "projectRole", parent: name, pattern: "^(Owner|Viewer|Contributor)$")
            try self.validate(self.userArn, name: "userArn", parent: name, max: 95)
            try self.validate(self.userArn, name: "userArn", parent: name, min: 32)
            try self.validate(self.userArn, name: "userArn", parent: name, pattern: "^arn:aws:iam::\\d{12}:user(?:(\\u002F)|(\\u002F[\\u0021-\\u007E]+\\u002F))[\\w+=,.@-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken
            case projectId
            case projectRole
            case remoteAccessAllowed
            case userArn
        }
    }

    public struct AssociateTeamMemberResult: AWSDecodableShape {
        /// The user- or system-generated token from the initial request that can be used to repeat the request.
        public let clientRequestToken: String?

        public init(clientRequestToken: String? = nil) {
            self.clientRequestToken = clientRequestToken
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken
        }
    }

    public struct Code: AWSEncodableShape {
        /// The repository to be created in AWS CodeStar. Valid values are AWS CodeCommit or GitHub. After AWS CodeStar provisions the new repository, the source code files provided with the project request are placed in the repository.
        public let destination: CodeDestination
        /// The location where the source code files provided with the project request are stored. AWS CodeStar retrieves the files during project creation.
        public let source: CodeSource

        public init(destination: CodeDestination, source: CodeSource) {
            self.destination = destination
            self.source = source
        }

        public func validate(name: String) throws {
            try self.destination.validate(name: "\(name).destination")
            try self.source.validate(name: "\(name).source")
        }

        private enum CodingKeys: String, CodingKey {
            case destination
            case source
        }
    }

    public struct CodeCommitCodeDestination: AWSEncodableShape {
        /// The name of the AWS CodeCommit repository to be created in AWS CodeStar.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^\\S[\\w.-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name
        }
    }

    public struct CodeDestination: AWSEncodableShape {
        /// Information about the AWS CodeCommit repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.
        public let codeCommit: CodeCommitCodeDestination?
        /// Information about the GitHub repository to be created in AWS CodeStar. This is where the source code files provided with the project request will be uploaded after project creation.
        public let gitHub: GitHubCodeDestination?

        public init(codeCommit: CodeCommitCodeDestination? = nil, gitHub: GitHubCodeDestination? = nil) {
            self.codeCommit = codeCommit
            self.gitHub = gitHub
        }

        public func validate(name: String) throws {
            try self.codeCommit?.validate(name: "\(name).codeCommit")
            try self.gitHub?.validate(name: "\(name).gitHub")
        }

        private enum CodingKeys: String, CodingKey {
            case codeCommit
            case gitHub
        }
    }

    public struct CodeSource: AWSEncodableShape {
        /// Information about the Amazon S3 location where the source code files provided with the project request are stored.
        public let s3: S3Location

        public init(s3: S3Location) {
            self.s3 = s3
        }

        public func validate(name: String) throws {
            try self.s3.validate(name: "\(name).s3")
        }

        private enum CodingKeys: String, CodingKey {
            case s3
        }
    }

    public struct CreateProjectRequest: AWSEncodableShape {
        /// A user- or system-generated token that identifies the entity that requested project creation. This token can be used to repeat the request.
        public let clientRequestToken: String?
        /// The description of the project, if any.
        public let description: String?
        /// The ID of the project to be created in AWS CodeStar.
        public let id: String
        /// The display name for the project to be created in AWS CodeStar.
        public let name: String
        /// A list of the Code objects submitted with the project request. If this parameter is specified, the request must also include the toolchain parameter.
        public let sourceCode: [Code]?
        /// The tags created for the project.
        public let tags: [String: String]?
        /// The name of the toolchain template file submitted with the project request. If this parameter is specified, the request must also include the sourceCode parameter.
        public let toolchain: Toolchain?

        public init(clientRequestToken: String? = nil, description: String? = nil, id: String, name: String, sourceCode: [Code]? = nil, tags: [String: String]? = nil, toolchain: Toolchain? = nil) {
            self.clientRequestToken = clientRequestToken
            self.description = description
            self.id = id
            self.name = name
            self.sourceCode = sourceCode
            self.tags = tags
            self.toolchain = toolchain
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 256)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[\\w:/-]+$")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, pattern: "^$|^\\S(.*\\S)?$")
            try self.validate(self.id, name: "id", parent: name, max: 15)
            try self.validate(self.id, name: "id", parent: name, min: 2)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-z][a-z0-9-]+$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^\\S(.*\\S)?$")
            try self.sourceCode?.forEach {
                try $0.validate(name: "\(name).sourceCode[]")
            }
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.toolchain?.validate(name: "\(name).toolchain")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken
            case description
            case id
            case name
            case sourceCode
            case tags
            case toolchain
        }
    }

    public struct CreateProjectResult: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the created project.
        public let arn: String
        /// A user- or system-generated token that identifies the entity that requested project creation.
        public let clientRequestToken: String?
        /// The ID of the project.
        public let id: String
        /// Reserved for future use.
        public let projectTemplateId: String?

        public init(arn: String, clientRequestToken: String? = nil, id: String, projectTemplateId: String? = nil) {
            self.arn = arn
            self.clientRequestToken = clientRequestToken
            self.id = id
            self.projectTemplateId = projectTemplateId
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case clientRequestToken
            case id
            case projectTemplateId
        }
    }

    public struct CreateUserProfileRequest: AWSEncodableShape {
        /// The name that will be displayed as the friendly name for the user in AWS CodeStar.
        public let displayName: String
        /// The email address that will be displayed as part of the user's profile in AWS CodeStar.
        public let emailAddress: String
        /// The SSH public key associated with the user in AWS CodeStar. If a project owner allows the user remote access to project resources, this public key will be used along with the user's private key for SSH access.
        public let sshPublicKey: String?
        /// The Amazon Resource Name (ARN) of the user in IAM.
        public let userArn: String

        public init(displayName: String, emailAddress: String, sshPublicKey: String? = nil, userArn: String) {
            self.displayName = displayName
            self.emailAddress = emailAddress
            self.sshPublicKey = sshPublicKey
            self.userArn = userArn
        }

        public func validate(name: String) throws {
            try self.validate(self.displayName, name: "displayName", parent: name, max: 64)
            try self.validate(self.displayName, name: "displayName", parent: name, min: 1)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "^\\S(.*\\S)?$")
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, max: 128)
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, min: 3)
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, pattern: "^[\\w-.+]+@[\\w-.+]+$")
            try self.validate(self.sshPublicKey, name: "sshPublicKey", parent: name, max: 16384)
            try self.validate(self.sshPublicKey, name: "sshPublicKey", parent: name, pattern: "^[\\t\\r\\n\\u0020-\\u00FF]*$")
            try self.validate(self.userArn, name: "userArn", parent: name, max: 95)
            try self.validate(self.userArn, name: "userArn", parent: name, min: 32)
            try self.validate(self.userArn, name: "userArn", parent: name, pattern: "^arn:aws:iam::\\d{12}:user(?:(\\u002F)|(\\u002F[\\u0021-\\u007E]+\\u002F))[\\w+=,.@-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case displayName
            case emailAddress
            case sshPublicKey
            case userArn
        }
    }

    public struct CreateUserProfileResult: AWSDecodableShape {
        /// The date the user profile was created, in timestamp format.
        public let createdTimestamp: Date?
        /// The name that is displayed as the friendly name for the user in AWS CodeStar.
        public let displayName: String?
        /// The email address that is displayed as part of the user's profile in AWS CodeStar.
        public let emailAddress: String?
        /// The date the user profile was last modified, in timestamp format.
        public let lastModifiedTimestamp: Date?
        /// The SSH public key associated with the user in AWS CodeStar. This is the public portion of the public/private keypair the user can use to access project resources if a project owner allows the user remote access to those resources.
        public let sshPublicKey: String?
        /// The Amazon Resource Name (ARN) of the user in IAM.
        public let userArn: String

        public init(createdTimestamp: Date? = nil, displayName: String? = nil, emailAddress: String? = nil, lastModifiedTimestamp: Date? = nil, sshPublicKey: String? = nil, userArn: String) {
            self.createdTimestamp = createdTimestamp
            self.displayName = displayName
            self.emailAddress = emailAddress
            self.lastModifiedTimestamp = lastModifiedTimestamp
            self.sshPublicKey = sshPublicKey
            self.userArn = userArn
        }

        private enum CodingKeys: String, CodingKey {
            case createdTimestamp
            case displayName
            case emailAddress
            case lastModifiedTimestamp
            case sshPublicKey
            case userArn
        }
    }

    public struct DeleteProjectRequest: AWSEncodableShape {
        /// A user- or system-generated token that identifies the entity that requested project deletion. This token can be used to repeat the request.
        public let clientRequestToken: String?
        /// Whether to send a delete request for the primary stack in AWS CloudFormation originally used to generate the project and its resources. This option will delete all AWS resources for the project (except for any buckets in Amazon S3) as well as deleting the project itself. Recommended for most use cases.
        public let deleteStack: Bool?
        /// The ID of the project to be deleted in AWS CodeStar.
        public let id: String

        public init(clientRequestToken: String? = nil, deleteStack: Bool? = nil, id: String) {
            self.clientRequestToken = clientRequestToken
            self.deleteStack = deleteStack
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 256)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[\\w:/-]+$")
            try self.validate(self.id, name: "id", parent: name, max: 15)
            try self.validate(self.id, name: "id", parent: name, min: 2)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-z][a-z0-9-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken
            case deleteStack
            case id
        }
    }

    public struct DeleteProjectResult: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the deleted project.
        public let projectArn: String?
        /// The ID of the primary stack in AWS CloudFormation that will be deleted as part of deleting the project and its resources.
        public let stackId: String?

        public init(projectArn: String? = nil, stackId: String? = nil) {
            self.projectArn = projectArn
            self.stackId = stackId
        }

        private enum CodingKeys: String, CodingKey {
            case projectArn
            case stackId
        }
    }

    public struct DeleteUserProfileRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the user to delete from AWS CodeStar.
        public let userArn: String

        public init(userArn: String) {
            self.userArn = userArn
        }

        public func validate(name: String) throws {
            try self.validate(self.userArn, name: "userArn", parent: name, max: 95)
            try self.validate(self.userArn, name: "userArn", parent: name, min: 32)
            try self.validate(self.userArn, name: "userArn", parent: name, pattern: "^arn:aws:iam::\\d{12}:user(?:(\\u002F)|(\\u002F[\\u0021-\\u007E]+\\u002F))[\\w+=,.@-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case userArn
        }
    }

    public struct DeleteUserProfileResult: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the user deleted from AWS CodeStar.
        public let userArn: String

        public init(userArn: String) {
            self.userArn = userArn
        }

        private enum CodingKeys: String, CodingKey {
            case userArn
        }
    }

    public struct DescribeProjectRequest: AWSEncodableShape {
        /// The ID of the project.
        public let id: String

        public init(id: String) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 15)
            try self.validate(self.id, name: "id", parent: name, min: 2)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-z][a-z0-9-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case id
        }
    }

    public struct DescribeProjectResult: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) for the project.
        public let arn: String?
        /// A user- or system-generated token that identifies the entity that requested project creation.
        public let clientRequestToken: String?
        /// The date and time the project was created, in timestamp format.
        public let createdTimeStamp: Date?
        /// The description of the project, if any.
        public let description: String?
        /// The ID of the project.
        public let id: String?
        /// The display name for the project.
        public let name: String?
        /// The ID for the AWS CodeStar project template used to create the project.
        public let projectTemplateId: String?
        /// The ID of the primary stack in AWS CloudFormation used to generate resources for the project.
        public let stackId: String?
        /// The project creation or deletion status.
        public let status: ProjectStatus?

        public init(arn: String? = nil, clientRequestToken: String? = nil, createdTimeStamp: Date? = nil, description: String? = nil, id: String? = nil, name: String? = nil, projectTemplateId: String? = nil, stackId: String? = nil, status: ProjectStatus? = nil) {
            self.arn = arn
            self.clientRequestToken = clientRequestToken
            self.createdTimeStamp = createdTimeStamp
            self.description = description
            self.id = id
            self.name = name
            self.projectTemplateId = projectTemplateId
            self.stackId = stackId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case clientRequestToken
            case createdTimeStamp
            case description
            case id
            case name
            case projectTemplateId
            case stackId
            case status
        }
    }

    public struct DescribeUserProfileRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the user.
        public let userArn: String

        public init(userArn: String) {
            self.userArn = userArn
        }

        public func validate(name: String) throws {
            try self.validate(self.userArn, name: "userArn", parent: name, max: 95)
            try self.validate(self.userArn, name: "userArn", parent: name, min: 32)
            try self.validate(self.userArn, name: "userArn", parent: name, pattern: "^arn:aws:iam::\\d{12}:user(?:(\\u002F)|(\\u002F[\\u0021-\\u007E]+\\u002F))[\\w+=,.@-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case userArn
        }
    }

    public struct DescribeUserProfileResult: AWSDecodableShape {
        /// The date and time when the user profile was created in AWS CodeStar, in timestamp format.
        public let createdTimestamp: Date
        /// The display name shown for the user in AWS CodeStar projects. For example, this could be set to both first and last name ("Mary Major") or a single name ("Mary"). The display name is also used to generate the initial icon associated with the user in AWS CodeStar projects. If spaces are included in the display name, the first character that appears after the space will be used as the second character in the user initial icon. The initial icon displays a maximum of two characters, so a display name with more than one space (for example "Mary Jane Major") would generate an initial icon using the first character and the first character after the space ("MJ", not "MM").
        public let displayName: String?
        /// The email address for the user. Optional.
        public let emailAddress: String?
        /// The date and time when the user profile was last modified, in timestamp format.
        public let lastModifiedTimestamp: Date
        /// The SSH public key associated with the user. This SSH public key is associated with the user profile, and can be used in conjunction with the associated private key for access to project resources, such as Amazon EC2 instances, if a project owner grants remote access to those resources.
        public let sshPublicKey: String?
        /// The Amazon Resource Name (ARN) of the user.
        public let userArn: String

        public init(createdTimestamp: Date, displayName: String? = nil, emailAddress: String? = nil, lastModifiedTimestamp: Date, sshPublicKey: String? = nil, userArn: String) {
            self.createdTimestamp = createdTimestamp
            self.displayName = displayName
            self.emailAddress = emailAddress
            self.lastModifiedTimestamp = lastModifiedTimestamp
            self.sshPublicKey = sshPublicKey
            self.userArn = userArn
        }

        private enum CodingKeys: String, CodingKey {
            case createdTimestamp
            case displayName
            case emailAddress
            case lastModifiedTimestamp
            case sshPublicKey
            case userArn
        }
    }

    public struct DisassociateTeamMemberRequest: AWSEncodableShape {
        /// The ID of the AWS CodeStar project from which you want to remove a team member.
        public let projectId: String
        /// The Amazon Resource Name (ARN) of the IAM user or group whom you want to remove from the project.
        public let userArn: String

        public init(projectId: String, userArn: String) {
            self.projectId = projectId
            self.userArn = userArn
        }

        public func validate(name: String) throws {
            try self.validate(self.projectId, name: "projectId", parent: name, max: 15)
            try self.validate(self.projectId, name: "projectId", parent: name, min: 2)
            try self.validate(self.projectId, name: "projectId", parent: name, pattern: "^[a-z][a-z0-9-]+$")
            try self.validate(self.userArn, name: "userArn", parent: name, max: 95)
            try self.validate(self.userArn, name: "userArn", parent: name, min: 32)
            try self.validate(self.userArn, name: "userArn", parent: name, pattern: "^arn:aws:iam::\\d{12}:user(?:(\\u002F)|(\\u002F[\\u0021-\\u007E]+\\u002F))[\\w+=,.@-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case projectId
            case userArn
        }
    }

    public struct DisassociateTeamMemberResult: AWSDecodableShape {
        public init() {}
    }

    public struct GitHubCodeDestination: AWSEncodableShape {
        /// Description for the GitHub repository to be created in AWS CodeStar. This description displays in GitHub after the repository is created.
        public let description: String?
        /// Whether to enable issues for the GitHub repository.
        public let issuesEnabled: Bool
        /// Name of the GitHub repository to be created in AWS CodeStar.
        public let name: String
        /// The GitHub username for the owner of the GitHub repository to be created in AWS CodeStar. If this repository should be owned by a GitHub organization, provide its name.
        public let owner: String
        /// Whether the GitHub repository is to be a private repository.
        public let privateRepository: Bool
        /// The GitHub user's personal access token for the GitHub repository.
        public let token: String
        /// The type of GitHub repository to be created in AWS CodeStar. Valid values are User or Organization.
        public let type: String

        public init(description: String? = nil, issuesEnabled: Bool, name: String, owner: String, privateRepository: Bool, token: String, type: String) {
            self.description = description
            self.issuesEnabled = issuesEnabled
            self.name = name
            self.owner = owner
            self.privateRepository = privateRepository
            self.token = token
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\S(.*\\S)?$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^\\S[\\w.-]*$")
            try self.validate(self.owner, name: "owner", parent: name, max: 100)
            try self.validate(self.owner, name: "owner", parent: name, min: 1)
            try self.validate(self.owner, name: "owner", parent: name, pattern: "^\\S(.*\\S)?$")
            try self.validate(self.token, name: "token", parent: name, min: 1)
            try self.validate(self.type, name: "type", parent: name, pattern: "^(user|organization|User|Organization)$")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case issuesEnabled
            case name
            case owner
            case privateRepository
            case token
            case type
        }
    }

    public struct ListProjectsRequest: AWSEncodableShape {
        /// The maximum amount of data that can be contained in a single set of results.
        public let maxResults: Int?
        /// The continuation token to be used to return the next set of results, if the results cannot be returned in one response.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 512)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\w/+=]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
        }
    }

    public struct ListProjectsResult: AWSDecodableShape {
        /// The continuation token to use when requesting the next set of results, if there are more results to be returned.
        public let nextToken: String?
        /// A list of projects.
        public let projects: [ProjectSummary]

        public init(nextToken: String? = nil, projects: [ProjectSummary]) {
            self.nextToken = nextToken
            self.projects = projects
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case projects
        }
    }

    public struct ListResourcesRequest: AWSEncodableShape {
        /// The maximum amount of data that can be contained in a single set of results.
        public let maxResults: Int?
        /// The continuation token for the next set of results, if the results cannot be returned in one response.
        public let nextToken: String?
        /// The ID of the project.
        public let projectId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, projectId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.projectId = projectId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 512)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\w/+=]+$")
            try self.validate(self.projectId, name: "projectId", parent: name, max: 15)
            try self.validate(self.projectId, name: "projectId", parent: name, min: 2)
            try self.validate(self.projectId, name: "projectId", parent: name, pattern: "^[a-z][a-z0-9-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case projectId
        }
    }

    public struct ListResourcesResult: AWSDecodableShape {
        /// The continuation token to use when requesting the next set of results, if there are more results to be returned.
        public let nextToken: String?
        /// An array of resources associated with the project.
        public let resources: [Resource]?

        public init(nextToken: String? = nil, resources: [Resource]? = nil) {
            self.nextToken = nextToken
            self.resources = resources
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resources
        }
    }

    public struct ListTagsForProjectRequest: AWSEncodableShape {
        /// The ID of the project to get tags for.
        public let id: String
        /// Reserved for future use.
        public let maxResults: Int?
        /// Reserved for future use.
        public let nextToken: String?

        public init(id: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.id = id
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 15)
            try self.validate(self.id, name: "id", parent: name, min: 2)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-z][a-z0-9-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 512)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\w/+=]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case maxResults
            case nextToken
        }
    }

    public struct ListTagsForProjectResult: AWSDecodableShape {
        /// Reserved for future use.
        public let nextToken: String?
        /// The tags for the project.
        public let tags: [String: String]?

        public init(nextToken: String? = nil, tags: [String: String]? = nil) {
            self.nextToken = nextToken
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case tags
        }
    }

    public struct ListTeamMembersRequest: AWSEncodableShape {
        /// The maximum number of team members you want returned in a response.
        public let maxResults: Int?
        /// The continuation token for the next set of results, if the results cannot be returned in one response.
        public let nextToken: String?
        /// The ID of the project for which you want to list team members.
        public let projectId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, projectId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.projectId = projectId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 512)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\w/+=]+$")
            try self.validate(self.projectId, name: "projectId", parent: name, max: 15)
            try self.validate(self.projectId, name: "projectId", parent: name, min: 2)
            try self.validate(self.projectId, name: "projectId", parent: name, pattern: "^[a-z][a-z0-9-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case projectId
        }
    }

    public struct ListTeamMembersResult: AWSDecodableShape {
        /// The continuation token to use when requesting the next set of results, if there are more results to be returned.
        public let nextToken: String?
        /// A list of team member objects for the project.
        public let teamMembers: [TeamMember]

        public init(nextToken: String? = nil, teamMembers: [TeamMember]) {
            self.nextToken = nextToken
            self.teamMembers = teamMembers
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case teamMembers
        }
    }

    public struct ListUserProfilesRequest: AWSEncodableShape {
        /// The maximum number of results to return in a response.
        public let maxResults: Int?
        /// The continuation token for the next set of results, if the results cannot be returned in one response.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 512)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\w/+=]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
        }
    }

    public struct ListUserProfilesResult: AWSDecodableShape {
        /// The continuation token to use when requesting the next set of results, if there are more results to be returned.
        public let nextToken: String?
        /// All the user profiles configured in AWS CodeStar for an AWS account.
        public let userProfiles: [UserProfileSummary]

        public init(nextToken: String? = nil, userProfiles: [UserProfileSummary]) {
            self.nextToken = nextToken
            self.userProfiles = userProfiles
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case userProfiles
        }
    }

    public struct ProjectStatus: AWSDecodableShape {
        /// In the case of a project creation or deletion failure, a reason for the failure.
        public let reason: String?
        /// The phase of completion for a project creation or deletion.
        public let state: String

        public init(reason: String? = nil, state: String) {
            self.reason = reason
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case reason
            case state
        }
    }

    public struct ProjectSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the project.
        public let projectArn: String?
        /// The ID of the project.
        public let projectId: String?

        public init(projectArn: String? = nil, projectId: String? = nil) {
            self.projectArn = projectArn
            self.projectId = projectId
        }

        private enum CodingKeys: String, CodingKey {
            case projectArn
            case projectId
        }
    }

    public struct Resource: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let id: String

        public init(id: String) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id
        }
    }

    public struct S3Location: AWSEncodableShape {
        /// The Amazon S3 object key where the source code files provided with the project request are stored.
        public let bucketKey: String?
        /// The Amazon S3 bucket name where the source code files provided with the project request are stored.
        public let bucketName: String?

        public init(bucketKey: String? = nil, bucketName: String? = nil) {
            self.bucketKey = bucketKey
            self.bucketName = bucketName
        }

        public func validate(name: String) throws {
            try self.validate(self.bucketName, name: "bucketName", parent: name, max: 63)
            try self.validate(self.bucketName, name: "bucketName", parent: name, min: 3)
        }

        private enum CodingKeys: String, CodingKey {
            case bucketKey
            case bucketName
        }
    }

    public struct TagProjectRequest: AWSEncodableShape {
        /// The ID of the project you want to add a tag to.
        public let id: String
        /// The tags you want to add to the project.
        public let tags: [String: String]

        public init(id: String, tags: [String: String]) {
            self.id = id
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 15)
            try self.validate(self.id, name: "id", parent: name, min: 2)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-z][a-z0-9-]+$")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case tags
        }
    }

    public struct TagProjectResult: AWSDecodableShape {
        /// The tags for the project.
        public let tags: [String: String]?

        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct TeamMember: AWSDecodableShape {
        /// The role assigned to the user in the project. Project roles have different levels of access. For more information, see Working with Teams in the AWS CodeStar User Guide.
        public let projectRole: String
        /// Whether the user is allowed to remotely access project resources using an SSH public/private key pair.
        public let remoteAccessAllowed: Bool?
        /// The Amazon Resource Name (ARN) of the user in IAM.
        public let userArn: String

        public init(projectRole: String, remoteAccessAllowed: Bool? = nil, userArn: String) {
            self.projectRole = projectRole
            self.remoteAccessAllowed = remoteAccessAllowed
            self.userArn = userArn
        }

        private enum CodingKeys: String, CodingKey {
            case projectRole
            case remoteAccessAllowed
            case userArn
        }
    }

    public struct Toolchain: AWSEncodableShape {
        /// The service role ARN for AWS CodeStar to use for the toolchain template during stack provisioning.
        public let roleArn: String?
        /// The Amazon S3 location where the toolchain template file provided with the project request is stored. AWS CodeStar retrieves the file during project creation.
        public let source: ToolchainSource
        /// The list of parameter overrides to be passed into the toolchain template during stack provisioning, if any.
        public let stackParameters: [String: String]?

        public init(roleArn: String? = nil, source: ToolchainSource, stackParameters: [String: String]? = nil) {
            self.roleArn = roleArn
            self.source = source
            self.stackParameters = stackParameters
        }

        public func validate(name: String) throws {
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1224)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 1)
            try self.source.validate(name: "\(name).source")
            try self.stackParameters?.forEach {
                try validate($0.key, name: "stackParameters.key", parent: name, max: 30)
                try validate($0.key, name: "stackParameters.key", parent: name, min: 1)
                try validate($0.key, name: "stackParameters.key", parent: name, pattern: "^\\S(.*\\S)?$")
                try validate($0.value, name: "stackParameters[\"\($0.key)\"]", parent: name, max: 100)
                try validate($0.value, name: "stackParameters[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "stackParameters[\"\($0.key)\"]", parent: name, pattern: "^\\S(.*\\S)?$")
            }
            try self.validate(self.stackParameters, name: "stackParameters", parent: name, max: 25)
        }

        private enum CodingKeys: String, CodingKey {
            case roleArn
            case source
            case stackParameters
        }
    }

    public struct ToolchainSource: AWSEncodableShape {
        /// The Amazon S3 bucket where the toolchain template file provided with the project request is stored.
        public let s3: S3Location

        public init(s3: S3Location) {
            self.s3 = s3
        }

        public func validate(name: String) throws {
            try self.s3.validate(name: "\(name).s3")
        }

        private enum CodingKeys: String, CodingKey {
            case s3
        }
    }

    public struct UntagProjectRequest: AWSEncodableShape {
        /// The ID of the project to remove tags from.
        public let id: String
        /// The tags to remove from the project.
        public let tags: [String]

        public init(id: String, tags: [String]) {
            self.id = id
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 15)
            try self.validate(self.id, name: "id", parent: name, min: 2)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-z][a-z0-9-]+$")
            try self.tags.forEach {
                try validate($0, name: "tags[]", parent: name, max: 128)
                try validate($0, name: "tags[]", parent: name, min: 1)
                try validate($0, name: "tags[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case tags
        }
    }

    public struct UntagProjectResult: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateProjectRequest: AWSEncodableShape {
        /// The description of the project, if any.
        public let description: String?
        /// The ID of the project you want to update.
        public let id: String
        /// The name of the project you want to update.
        public let name: String?

        public init(description: String? = nil, id: String, name: String? = nil) {
            self.description = description
            self.id = id
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, pattern: "^$|^\\S(.*\\S)?$")
            try self.validate(self.id, name: "id", parent: name, max: 15)
            try self.validate(self.id, name: "id", parent: name, min: 2)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-z][a-z0-9-]+$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^\\S(.*\\S)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case id
            case name
        }
    }

    public struct UpdateProjectResult: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateTeamMemberRequest: AWSEncodableShape {
        /// The ID of the project.
        public let projectId: String
        /// The role assigned to the user in the project. Project roles have different levels of access. For more information, see Working with Teams in the AWS CodeStar User Guide.
        public let projectRole: String?
        /// Whether a team member is allowed to remotely access project resources using the SSH public key associated with the user's profile. Even if this is set to True, the user must associate a public key with their profile before the user can access resources.
        public let remoteAccessAllowed: Bool?
        /// The Amazon Resource Name (ARN) of the user for whom you want to change team membership attributes.
        public let userArn: String

        public init(projectId: String, projectRole: String? = nil, remoteAccessAllowed: Bool? = nil, userArn: String) {
            self.projectId = projectId
            self.projectRole = projectRole
            self.remoteAccessAllowed = remoteAccessAllowed
            self.userArn = userArn
        }

        public func validate(name: String) throws {
            try self.validate(self.projectId, name: "projectId", parent: name, max: 15)
            try self.validate(self.projectId, name: "projectId", parent: name, min: 2)
            try self.validate(self.projectId, name: "projectId", parent: name, pattern: "^[a-z][a-z0-9-]+$")
            try self.validate(self.projectRole, name: "projectRole", parent: name, pattern: "^(Owner|Viewer|Contributor)$")
            try self.validate(self.userArn, name: "userArn", parent: name, max: 95)
            try self.validate(self.userArn, name: "userArn", parent: name, min: 32)
            try self.validate(self.userArn, name: "userArn", parent: name, pattern: "^arn:aws:iam::\\d{12}:user(?:(\\u002F)|(\\u002F[\\u0021-\\u007E]+\\u002F))[\\w+=,.@-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case projectId
            case projectRole
            case remoteAccessAllowed
            case userArn
        }
    }

    public struct UpdateTeamMemberResult: AWSDecodableShape {
        /// The project role granted to the user.
        public let projectRole: String?
        /// Whether a team member is allowed to remotely access project resources using the SSH public key associated with the user's profile.
        public let remoteAccessAllowed: Bool?
        /// The Amazon Resource Name (ARN) of the user whose team membership attributes were updated.
        public let userArn: String?

        public init(projectRole: String? = nil, remoteAccessAllowed: Bool? = nil, userArn: String? = nil) {
            self.projectRole = projectRole
            self.remoteAccessAllowed = remoteAccessAllowed
            self.userArn = userArn
        }

        private enum CodingKeys: String, CodingKey {
            case projectRole
            case remoteAccessAllowed
            case userArn
        }
    }

    public struct UpdateUserProfileRequest: AWSEncodableShape {
        /// The name that is displayed as the friendly name for the user in AWS CodeStar.
        public let displayName: String?
        /// The email address that is displayed as part of the user's profile in AWS CodeStar.
        public let emailAddress: String?
        /// The SSH public key associated with the user in AWS CodeStar. If a project owner allows the user remote access to project resources, this public key will be used along with the user's private key for SSH access.
        public let sshPublicKey: String?
        /// The name that will be displayed as the friendly name for the user in AWS CodeStar.
        public let userArn: String

        public init(displayName: String? = nil, emailAddress: String? = nil, sshPublicKey: String? = nil, userArn: String) {
            self.displayName = displayName
            self.emailAddress = emailAddress
            self.sshPublicKey = sshPublicKey
            self.userArn = userArn
        }

        public func validate(name: String) throws {
            try self.validate(self.displayName, name: "displayName", parent: name, max: 64)
            try self.validate(self.displayName, name: "displayName", parent: name, min: 1)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "^\\S(.*\\S)?$")
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, max: 128)
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, min: 3)
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, pattern: "^[\\w-.+]+@[\\w-.+]+$")
            try self.validate(self.sshPublicKey, name: "sshPublicKey", parent: name, max: 16384)
            try self.validate(self.sshPublicKey, name: "sshPublicKey", parent: name, pattern: "^[\\t\\r\\n\\u0020-\\u00FF]*$")
            try self.validate(self.userArn, name: "userArn", parent: name, max: 95)
            try self.validate(self.userArn, name: "userArn", parent: name, min: 32)
            try self.validate(self.userArn, name: "userArn", parent: name, pattern: "^arn:aws:iam::\\d{12}:user(?:(\\u002F)|(\\u002F[\\u0021-\\u007E]+\\u002F))[\\w+=,.@-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case displayName
            case emailAddress
            case sshPublicKey
            case userArn
        }
    }

    public struct UpdateUserProfileResult: AWSDecodableShape {
        /// The date the user profile was created, in timestamp format.
        public let createdTimestamp: Date?
        /// The name that is displayed as the friendly name for the user in AWS CodeStar.
        public let displayName: String?
        /// The email address that is displayed as part of the user's profile in AWS CodeStar.
        public let emailAddress: String?
        /// The date the user profile was last modified, in timestamp format.
        public let lastModifiedTimestamp: Date?
        /// The SSH public key associated with the user in AWS CodeStar. This is the public portion of the public/private keypair the user can use to access project resources if a project owner allows the user remote access to those resources.
        public let sshPublicKey: String?
        /// The Amazon Resource Name (ARN) of the user in IAM.
        public let userArn: String

        public init(createdTimestamp: Date? = nil, displayName: String? = nil, emailAddress: String? = nil, lastModifiedTimestamp: Date? = nil, sshPublicKey: String? = nil, userArn: String) {
            self.createdTimestamp = createdTimestamp
            self.displayName = displayName
            self.emailAddress = emailAddress
            self.lastModifiedTimestamp = lastModifiedTimestamp
            self.sshPublicKey = sshPublicKey
            self.userArn = userArn
        }

        private enum CodingKeys: String, CodingKey {
            case createdTimestamp
            case displayName
            case emailAddress
            case lastModifiedTimestamp
            case sshPublicKey
            case userArn
        }
    }

    public struct UserProfileSummary: AWSDecodableShape {
        /// The display name of a user in AWS CodeStar. For example, this could be set to both first and last name ("Mary Major") or a single name ("Mary"). The display name is also used to generate the initial icon associated with the user in AWS CodeStar projects. If spaces are included in the display name, the first character that appears after the space will be used as the second character in the user initial icon. The initial icon displays a maximum of two characters, so a display name with more than one space (for example "Mary Jane Major") would generate an initial icon using the first character and the first character after the space ("MJ", not "MM").
        public let displayName: String?
        /// The email address associated with the user.
        public let emailAddress: String?
        /// The SSH public key associated with the user in AWS CodeStar. If a project owner allows the user remote access to project resources, this public key will be used along with the user's private key for SSH access.
        public let sshPublicKey: String?
        /// The Amazon Resource Name (ARN) of the user in IAM.
        public let userArn: String?

        public init(displayName: String? = nil, emailAddress: String? = nil, sshPublicKey: String? = nil, userArn: String? = nil) {
            self.displayName = displayName
            self.emailAddress = emailAddress
            self.sshPublicKey = sshPublicKey
            self.userArn = userArn
        }

        private enum CodingKeys: String, CodingKey {
            case displayName
            case emailAddress
            case sshPublicKey
            case userArn
        }
    }
}

// MARK: - Errors

/// Error enum for CodeStar
public struct CodeStarErrorType: AWSErrorType {
    enum Code: String {
        case concurrentModificationException = "ConcurrentModificationException"
        case invalidNextTokenException = "InvalidNextTokenException"
        case invalidServiceRoleException = "InvalidServiceRoleException"
        case limitExceededException = "LimitExceededException"
        case projectAlreadyExistsException = "ProjectAlreadyExistsException"
        case projectConfigurationException = "ProjectConfigurationException"
        case projectCreationFailedException = "ProjectCreationFailedException"
        case projectNotFoundException = "ProjectNotFoundException"
        case teamMemberAlreadyAssociatedException = "TeamMemberAlreadyAssociatedException"
        case teamMemberNotFoundException = "TeamMemberNotFoundException"
        case userProfileAlreadyExistsException = "UserProfileAlreadyExistsException"
        case userProfileNotFoundException = "UserProfileNotFoundException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize CodeStar
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// Another modification is being made. That modification must complete before you can make your change.
    public static var concurrentModificationException: Self { .init(.concurrentModificationException) }
    /// The next token is not valid.
    public static var invalidNextTokenException: Self { .init(.invalidNextTokenException) }
    /// The service role is not valid.
    public static var invalidServiceRoleException: Self { .init(.invalidServiceRoleException) }
    /// A resource limit has been exceeded.
    public static var limitExceededException: Self { .init(.limitExceededException) }
    /// An AWS CodeStar project with the same ID already exists in this region for the AWS account. AWS CodeStar project IDs must be unique within a region for the AWS account.
    public static var projectAlreadyExistsException: Self { .init(.projectAlreadyExistsException) }
    /// Project configuration information is required but not specified.
    public static var projectConfigurationException: Self { .init(.projectConfigurationException) }
    /// The project creation request was valid, but a nonspecific exception or error occurred during project creation. The project could not be created in AWS CodeStar.
    public static var projectCreationFailedException: Self { .init(.projectCreationFailedException) }
    /// The specified AWS CodeStar project was not found.
    public static var projectNotFoundException: Self { .init(.projectNotFoundException) }
    /// The team member is already associated with a role in this project.
    public static var teamMemberAlreadyAssociatedException: Self { .init(.teamMemberAlreadyAssociatedException) }
    /// The specified team member was not found.
    public static var teamMemberNotFoundException: Self { .init(.teamMemberNotFoundException) }
    /// A user profile with that name already exists in this region for the AWS account. AWS CodeStar user profile names must be unique within a region for the AWS account.
    public static var userProfileAlreadyExistsException: Self { .init(.userProfileAlreadyExistsException) }
    /// The user profile was not found.
    public static var userProfileNotFoundException: Self { .init(.userProfileNotFoundException) }
    /// The specified input is either not valid, or it could not be validated.
    public static var validationException: Self { .init(.validationException) }
}

extension CodeStarErrorType: Equatable {
    public static func == (lhs: CodeStarErrorType, rhs: CodeStarErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension CodeStarErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
